package test;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;



public class test01 {

	public static void main(String[] args) {
			List<A> list = new ArrayList<>();
			list.add(new A(1));
			list.add(new A(3));
			list.add(new A(2));
			list.add(new A(7));
			list.add(new A(6));
			Collections.sort(list, (o1, o2) -> o2.a-o1.a);
	}

}
class A{
	int a;
	public A(int a){
		this.a=a;
	}
}